﻿using MySSO.Core.Entity;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Dapper;

namespace MySSO.Core.Repository
{
    public class LogRecordRefurlRepository : BaseRepository
    {
        public long InsertLogRecordRefurlEntity(LogRecordRefurlEntity entity)
        {
            long ID = 0;
            if (entity == null)
            {
                return ID;
            }
            string sql = @"INSERT INTO log_recordRefurl([RID],[refurl],[IpAddress],[system],[Browser],[create_time])
                          VALUES (@RID,@refurl,@IpAddress,@system,@Browser,@create_time);SELECT @@IDENTITY;";
            using (var connection = GetVisitConnection())
            {
                ID = connection.ExecuteScalar<long>(sql, entity);
            }
            return ID;
        }
    }
}
